

import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
//import sun.util.calendar.Gregorian;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author eros
 */
public class cryptochar {


    

    static public String addOneToChar(String s){
        if(s != null && s.length()>3 ){
            String result = "";
            char[] finalCharArray = new char[s.length()];
            for(int i = 0; i < s.length(); i ++){
           
                finalCharArray[i] = (char) (s.charAt(i) + 1);


            }
            return result.copyValueOf(finalCharArray);
        }else{
             return null;
        }



       
    }
    public static String getDataFormatada(){
        Locale loc = new Locale("pt", "PT");
        

        Date dd = new Date();
        TimeZone tz = TimeZone.getDefault();
        Calendar c = Calendar.getInstance(tz);

        DateFormat df = DateFormat.getDateInstance(DateFormat.FULL,loc);

        return df.format(dd);
    }


    

    static public String removeOneToChar(String s){
        if(s != null && s.length()>3 ){
            String result = "";
            char[] finalCharArray = new char[s.length()];
            
            for(int i = 0; i < s.length(); i ++){

                finalCharArray[i] = (char) (s.charAt(i) - 1);


            }
            return result.copyValueOf(finalCharArray);
        }else{
             return null;
        }




    }



    static public String printChar(String s){
        if(s != null && s.length()>-1){
            String result = "";
           
            
            for(int i = 0; i < s.length(); i ++){

               if(s.charAt(i)>'0' || s.charAt(i) < '9'){
                   result += s.charAt(i);
               }

            }

            System.out.println(result);
           

             
            
            return null; //result.copyValueOf(finalCharArray);
        }else{
             return null;
        }




    }


    public static void main(String... args){
       // pegaString("eros");
        //System.out.println(removeOneToChar("ESDRAS"));
      // printChar("213043..65875");
     // System.out.println("abasdfasdf1 2wasdfasdf9_8asdfasdfz asdfasdfyx7".replaceAll("\\D", ""));
     System.out.println(addOneToChar("GRASIELA"));


     // boolean b = Cpf.cpfValidador("   21-304/365.87--5 ");

       // System.out.println(getDataFormatada());
    }


}
